/**
 * 
 */
package org.cuatrovinetos.parking;

import java.util.Scanner;

/**
 * @author David
 *
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		String line="";
		int option=0;
		Parking myParking = new Parking();
		
		do {
			
			System.out.println("Menu");
			System.out.println("1.-Insert Car");
			System.out.println("2.-Remove Car");
			System.out.println("3.-Exit");
			line=reader.nextLine();
			try{
				
				option=Integer.parseInt(line);
			}catch (Exception ex){
				option=10;
			}finally{
				switch(option){
					case 1:
						System.out.println("Enter name: ");
						line=reader.nextLine();
						System.out.println("Enter branch: ");
						String branch=reader.nextLine();
						System.out.println(myParking.insertCar(line, branch));
						break;
						
					case 2:
						System.out.println("Enter name: ");
						line=reader.nextLine();
						System.out.println(myParking.removeCar(line));
						break;
				}
			}
		}while(option != 3);
		reader.close();
		
		
	}

}
